package com.test.common.entity.perf.inner;

import lombok.Data;

import javax.persistence.Transient;

@Data
public class ErrorMessageEntity {

	private String request;
	private String response;

	private long value;

	@Transient
	private String name;

	public ErrorMessageEntity(String request, String response, long value) {
		this.request = request;
		this.response = response;
		this.value = value;
		this.name = this.response;
	}

	public void countUp() {
		this.value++;
	}

	public void add(ErrorMessageEntity errorMessageEntity) {
		this.value += errorMessageEntity.value;
	}
}
